﻿using System;
using System.Collections.Generic;

using RexToy.ORM.Configuration;

namespace Studio.Model
{
    public class DBConfig : IORMConfig
    {
        private IDatabaseInfo _info;
        public DBConfig(string cnnstr, string provider, string dialectId, string dialectProvider)
        {
            _info = new DatabaseInfo(cnnstr, provider, dialectId, dialectProvider);
        }

        public int DatabaseCount
        {
            get { return 1; }
        }

        public bool ExistDatabase(string dbId)
        {
            return true;
        }

        public IEnumerable<string> GetAllDbIds()
        {
            return new List<string>() { "default" };
        }

        public IDatabaseInfo GetDatabaseInfo(string dbId)
        {
            return _info;
        }

        public string[] GetObjectMapPaths()
        {
            return new string[0];
        }
    }
}
